#ifndef _RS485_H_
#define _RS485_H_

#include "includes.h"
#include "drv_uart.h"

#define REG_MAX_NUM 1500

extern int fd_rs485, fd_tuya;

extern uint8_t g_Timer8DispCommErrCnt;
extern uint16_t g_sys_error_count;

int uart_write_bytes(int uart_num, const void * src, size_t size);

uint16_t * find_addr_index(int devAddr, int regAddr);
uint8_t *find_modbus_index(int addr);
void rs485_start(void);

#endif